home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Jun 89 / V0041-WDEF's in MacApp-Jun89 < prev    next >
Encoding:
Text File  |  1989-06-26  |  2.0 KB  |  76 lines  |  [TEXT/GEOL]

  1. Item    8212151                         15-June-89        06:06
  2.  
  3. From:   D1665                           Data Translation, W Feninger, PRT
  4.  
  5. To:     MACDTS                          Macintosh Developer Technical Supt.
  6.  
  7. cc:     MACAPP.TECH$                    MACAPP Tech
  8.  
  9. Sub:    WDEF's in MacApp
  10.  
  11.  
  12. To        :     MacDTS
  13.         MacApp.Tech$
  14.  
  15. From    :   Tom McCarthy
  16.         Data Translation, Inc.
  17.  
  18. Subject    : Custom WDEF's and MacApp
  19.  
  20. Date    : 6/15/89
  21.  
  22.  
  23. I have a non MacApp application that implements a custom WDEF window.  I
  24. also have a MacApp (v2.0) application which stores its views in a 'view'
  25. resource and creates the window and views by calling NewTemplateWindow.
  26.  
  27.  
  28. The 'view' resource does not appear to provide for custom WDEF's. What methods
  29. should I override to:
  30.  
  31.     A. Create a window with my own WDEF and
  32.  
  33.     B. load the windows from the 'view' resource.
  34.  
  35.     I modified the "Nothing" sample program to use the new WDEF resource and load
  36.     a single view from a 'view' resource.  But,     I have not had any success
  37. creating a scrolling view.  This is what I have so far:
  38.  
  39.     {----------------------------------------------------------------------------}
  40.     {----------------------------------------------------------------------------}
  41.     {----------------------------------------------------------------------------}
  42.     PROCEDURE TNothingDocument.DoMakeViews(forPrinting: BOOLEAN); OVERRIDE;
  43.  
  44.     Var
  45.             aScroller        : TScroller;
  46.             aWindow            : TCC_Window;
  47.             aWMGRWindow        : WindowPtr;
  48.  
  49.     BEGIN
  50.  
  51.             New (aWindow);
  52.             FailNil (aWindow);
  53.  
  54.             aWMGRWindow := GetNewWindow(1001, nil, Pointer( - 1));
  55.             aWindow.IWindow (self, aWMGRWindow, true, true, true);
  56.  
  57.  
  58.             aScroller := TScroller (DoCreateViews(SELF, NIL, kNothingWindowID));
  59.             aScroller.CreateScrollBars (true, true);
  60.             fNothingView := TNothingView (aScroller.FindSubView ('NOTH'));
  61.  
  62.             aWindow.AddSubView (aScroller);
  63.             aWindow.SetTarget (fNothingView);
  64.             aWindow.fTargetID := 'NOTH';
  65.  
  66.     END;
  67.  
  68.  
  69.     Any help is much appreciated!
  70.  
  71.  
  72.     Tom McCarthy.
  73.     Data Translation, Inc.
  74.  
  75.  
  76.